Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-28716][SQL] Add id to Exchange and Subquery's stringArgs method for easier identifying their reuses in query plans #727

Merged
merged 1 commit into from
Jan 29, 2021

Conversation

rshkv
Copy link

@rshkv rshkv commented Jan 29, 2021

We have an internal application that'd like to link re-used query plans. SPARK-28716 introduced SparkPlan#id which would do that for us.

From the PR:

Add id to Exchange and Subquery's stringArgs method for easier identifying their reuses in query plans, for example:

ReusedExchange d_date_sk#827, BroadcastExchange HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint))) [id=#2710]

Where 2710 is the id of the reused exchange.

What changes were proposed in this pull request?

The new SparkPlan#newPlanId() generates an incrementing integer id. Everytime a SparkPlan is instantiated, it uses that method to populate its id value.

How was this patch tested?

As the upstream PR, this relies on existing tests. The logic is simple enough though.

…d for easier identifying their reuses in query plans

Add id to Exchange and Subquery's stringArgs method for easier identifying their reuses in query plans, for example:
```
ReusedExchange d_date_sk#827, BroadcastExchange HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint))) [id=apache#2710]
```
Where `2710` is the id of the reused exchange.

Passes existing tests

Closes apache#25434 from dbaliafroozeh/ImplementStringArgsExchangeSubqueryExec.

Authored-by: Ali Afroozeh <[email protected]>
Signed-off-by: herman <[email protected]>
@rshkv rshkv requested a review from robert3005 January 29, 2021 11:23
@rshkv rshkv merged commit aebfc91 into master Jan 29, 2021
@rshkv rshkv deleted the wr/spark-28716 branch January 29, 2021 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants